
package com.whosly.mysql.protocol.packet;

/**
 * 默认值
 *
 * @author 风杨
 * @date 2023年06月25日 下午7:34
 * @see <a href="yueny09@163.com">mailTo: yueny09@163.com</a>
 */
public class MysqlPacketDefaultConstants {
    /**
     * default is 32, compatible to old value.
     *
     * config key: value:
     * MYSQL_PROTOCOL_PACKET_INPUT_BUFFER_SIZE_KEY \ DEFAULT_MYSQL_PROTOCOL_PACKET_INPUT_BUFFER_SIZE
     */
    public static Integer mysqlProtocolPacketInputBufferSize = 32;

    /**
     *
     * config key: value:
     * MYSQL_PROTOCOL_PACKET_INPUT_MAX_SIZE_KEY \ DEFAULT_MYSQL_PROTOCOL_THREADPOOL_SIZE
     */
    public static Integer mysqlProtocolPacketInputMaxSize = 16 * 1024 * 1024;

    /**
     *
     * config key: value:
     * MYSQL_PROTOCOL_BLACKLOG_SIZE_KEY \ DEFAULT_MYSQL_PROTOCOL_BLACKLOG_SIZE
     */
    public static Integer mysqlProtcolBackLogSize = 4096;

    /**
     *
     * config key: value:
     * PROTOCOL_BUFFER_CACHE_MEM_SIZE_KEY \ DEFAULT_PROTOCOL_BUFFER_CACHE_MEM_SIZE
     */
    public static Long protocolBufferCacheMemSize = 256L * 1024 * 1024;

    /**
     *
     * config key: value:
     * ENABLE_DEBUG_KEY \ DEFAULT_ENABLE_DEBUG
     */
    public static boolean debugEnable = false;

    /**
     *
     * config key: value:
     * xxx_ROW_COUNT_WHEN_BATCH_INSERT_KEY \ DEFAULT_xxx_ROW_COUNT_WHEN_BATCH_INSERT
     */
    public static int defaultRowCountWhenBatchInsert = 1024;

    /**
     *
     * config key: value:
     * xxx_LOAD_DATA_PACKET_BUFFER_SIZE_KEY \ DEFAULT_xxx_LOAD_DATA_PACKET_BUFFER_SIZE
     */
    public static int defaultLoadDataPacketBufferSize = 128;

    /**
     *
     * MYSQL_PROTOCOL_THREADPOOL_SIZE_KEY \ DEFAULT_MYSQL_PROTOCOL_THREADPOOL_SIZE
     */
    public static int defaultMysqlProtocolThreadpoolSize = 512;

    /**
     * 是否打印插入日志
     *
     * RC_PRINT_INSERT_LOG_KEY \ DEFAULT_RC_PRINT_INSERT_LOG
     */
    public static boolean printInsertLog = true;

    /**
     * 是否开启权限校验. 默认开启.
     *
     * SECURITY_AUTH_ENABLE_KEY \ DEFAULT_SECURITY_AUTH_ENABLE
     */
    public static boolean securityAuthEnable = true;

}
